//
//  squareTableView.m
//  FastRunDemo
//
//  Created by 苟亚明 on 16/9/18.
//  Copyright © 2016年 苟亚明. All rights reserved.
//

#import "squareTableView.h"
#import "XMGInfiniteScrollView.h"
@interface squareTableView() <UIGestureRecognizerDelegate>
@property (nonatomic, strong) NSArray *arrayData;
@end


@implementation squareTableView

- (void)loadData{
    self.arrayData = @[
                       [UIImage imageNamed:@"img_00"],
                       [UIImage imageNamed:@"img_01"],
                       [UIImage imageNamed:@"img_02"],
                       [UIImage imageNamed:@"img_03"]
                       ];
}

- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style{
    if (self = [super initWithFrame:frame style:style]) {
        [self loadData];
        XMGInfiniteScrollView *scrollView = [[XMGInfiniteScrollView alloc] init];
        scrollView.bounds = CGRectMake(0, 0, GYMScreenW, 150);
        scrollView.images = self.arrayData;
        scrollView.pageControl.currentPageIndicatorTintColor = [UIColor orangeColor];
        scrollView.pageControl.pageIndicatorTintColor = [UIColor grayColor];
        self.tableHeaderView = scrollView;

        
        self.separatorStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
}

@end
